home *** CD-ROM | disk | FTP | other *** search
/ Clickx 23 / Clickx 23.iso / DATA / moveabletype / images / global.js next >
Encoding:
JavaScript  |  2005-04-13  |  1.7 KB  |  47 lines

  1. /* preload nav images for hover
  2. nav_group = new Image();
  3. nav_group.src = '/i/nav_group.gif';
  4. nav_tp_hover = new Image();
  5. nav_tp_hover.src = 'i/nav_tp_hover.png';
  6. nav_about_hover = new Image();
  7. nav_about_hover.src = 'i/nav_about_hover.png';
  8. nav_support_hover = new Image();
  9. nav_support_hover.src = 'i/nav_support_hover.png'; */
  10.  
  11. /* Script to toggle between Latest Updated and Most Popular on plugin center */
  12.  
  13. /* function toggle(lnk, other_lnk, show_elem, hide_elem) {
  14.     lnk.style.textDecoration = 'underline';
  15.     document.getElementById(other_lnk).style.textDecoration = 'none';
  16.     document.getElementById(hide_elem).style.display = 'none';
  17.     document.getElementById(show_elem).style.display = 'block';
  18. } */
  19.  
  20. /* Used to clear the floats for IE/Mac: http://www.positioniseverything.net/easyclearing.html */
  21.  
  22. function fixmacie(classname) {        
  23.     var divs=document.getElementsByTagName("DIV");   
  24.     for (var d=0; d < divs.length;d++) {     
  25.     if (divs[d].className.indexOf(classname)==0) {    
  26.         divs[d].innerHTML += "<div class='mac-clearfix'> </div>"; 
  27.         /* The above html tags get added to the end of 
  28.         the cleared container if the browser is IE/mac. */  
  29.         }
  30.     }
  31. }
  32. function init() {
  33.     /* Check if the browser is IE5 Mac */
  34.     if (navigator.appVersion.indexOf('Mac')!=-1 && document.all) {     
  35.         /* Pass the class name on the container to fixmacie 
  36.         (must be the FIRST classname if multiple classnames 
  37.         are used on the div!) */    
  38.         fixmacie("clearfix");  
  39.     }
  40. }
  41. /* start the ball rolling when the page loads */
  42. window.onload = init;
  43.  
  44. /* New windows when we need them */
  45. function openWindow(document,name,width,height) {
  46.    window.open(document,name,'width='+width+',height='+height+',scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=100,top=100');
  47. }